/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.GUI.sidepanels;

import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.JTextField;

/**
 *
 * @author Arfeniel
 */
public class EditableTextField extends JTextField implements FocusListener {

    public EditableTextField(String name) {
        super(name);
        this.addFocusListener(this);
    }

    public void focusGained(FocusEvent e) {
        EditableTextField et = (EditableTextField) e.getSource();
        et.selectAll();
    }

    public void focusLost(FocusEvent e) {
        //throw new UnsupportedOperationException("Not supported yet.");
    }
}
